package main.java.content.enemy;

import main.java.base.IElement;
import main.java.content.enemy.base.Enemy;
import main.java.content.enemy.base.IEnemy;

/**
 * @author 吴浩华 陈逸然 吴畏
 * @Description: 跳跳的敌人
 * @date 2021/6/11
 */
@IEnemy(probability = 70, number = 3, score = 0)
@IElement(leftImage = "java1.png", rightImage = "javabook.png",height = 50,width =40,
        ySpeed = 60, rewardScore = 300)
public class JumpEnemy extends Enemy {

    public JumpEnemy(int x, int y) {
        super(x, y);
    }

    @Override
    protected void yMove() {
        if (onTheGround()) {
            this.y -= this.ySpeed;
        }
    }

    @Override
    public float getQuality() {
        return 35;
    }
}
